package com.sicau.smart_farmer.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.data.mongodb.core.mapping.DBRef;

import java.util.Date;
import java.util.List;

/**
 * @author sxt
 * @create 2019-11-22 16:36
 */
@ToString
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class User {

    @ApiModelProperty(value = "id")
    private String id;
    @ApiModelProperty(value = "乡镇",example = "金水镇")
    private String town; //乡镇
    @ApiModelProperty(value = "姓名",example = "王大锤")
    private String name; //姓名
    @ApiModelProperty(value = "性别",example = "男")
    private String gender;  //性别
    @ApiModelProperty(value = "照片",example = "/test.png")
    private String faceImage;  //照片
    @ApiModelProperty(value = "生日",example = "1998-09-08")
    private Date birthday;   //生日
    @ApiModelProperty(value = "民族",example =  "汉族")
    private String nation;  //民族
    @ApiModelProperty(value = "教育水平",example = "大专")
    private String educationalLevel;//教育水平
    @ApiModelProperty(value = "身份证号",example = "511323199808087787")
    private String idCardNum;   //身份证号
    @ApiModelProperty(value = "专业",example = "养猪专业")
    private String major;  //专业
    @ApiModelProperty(value = "政治面貌",example = "群众")
    private String politicalStatus;    //政治面貌
    @ApiModelProperty(value = "电话号码",example = "13633323897")
    private String phoneNum;   //电话号码
    @ApiModelProperty(value = "邮箱",example = "612339754@test.com")
    private String email;   //邮箱
    @ApiModelProperty(value = "QQ号",example = "612339712")
    private String qqNum;   //QQ号
    @ApiModelProperty(value = "微信号",example = "TEST121")
    private String weChatNum;   //微信号
    @ApiModelProperty(value = "省",example = "四川省")
    private String province;   //省
    @ApiModelProperty(value = "市",example = "成都市")
    private String city;    //市
    @ApiModelProperty(value = "区",example = "郫都区")
    private String district;   //区
    @ApiModelProperty(value = "户籍地址",example = "四川锦城")
    private String address = "";   //户籍地址

    @DBRef
    @ApiModelProperty(value = "用户类型")
    private UserType userType; //用户类型

    @ApiModelProperty(value = "申请方式")
    @DBRef
    private ApplicationMethod applicationMethod;  //申请方式

    @ApiModelProperty(value = "是否参加地方培训",example = "true")
    public boolean isAttendLocalTraining;     //是否参加地方培训
    @ApiModelProperty(value = "地方培训说明",example = "该农民表现良好")
    private String localTrainingDescription;  //地方培训说明
    @ApiModelProperty(value = "平均每年地方培训次数",example = "2")
    private Integer localTrainingTimes;       //平均每年地方培训次数
    @ApiModelProperty(value = "国家培训次数",example = "1")
    private Integer nationalTrainingTimes;     //国家培训次数
    @ApiModelProperty(value = "国家培训描述",example = "无")
    private String nationalTrainingDescription;   //国家培训描述

    @ApiModelProperty(value = "获得证书情况")
    private List<Certificate> certificates;      //获得证书情况

    @ApiModelProperty(value = "认定情况",example = "true")
    private boolean identification;     //认定情况
    @ApiModelProperty(value = "新型职业农业证书编号",example = "2121937453jf")
    private String identificationNum;   //新型职业农业证书编号
    @ApiModelProperty(value = "类型变更",example = "无")
    private String typeChange;         //类型变更

    @ApiModelProperty(value = "产业经营基本情况")
    private IndustryBaseInfo industryBaseInfo;     //产业经营基本情况


    public boolean isAttendLocalTraining() {
        return isAttendLocalTraining;
    }

    public void setAttendLocalTraining(boolean attendLocalTraining) {
        isAttendLocalTraining = attendLocalTraining;
    }
}